<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (Schema::hasTable('configuration')) { return; }

        Schema::create('configuration', function (Blueprint $table) {
            $table->integer('max_rev_day')->comment('最大提前预约天数');
$table->integer('max_cancel_rev')->comment('最大可提前取消预约时间：分钟');
$table->string('time_ids')->comment('默认上课时间段');
$table->text('banners')->comment('首页banner图链接');
$table->text('about_us')->comment('关于我们');
$table->creatorId();
$table->createdAt();
$table->updatedAt();

$table->engine='InnoDB';
$table->comment('配置管理');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('configuration');
    }
};
